#ifndef __INPUT_MANAGER_HPP__
#define __INPUT_MANAGER_HPP__

#include <memory>
#include "SDL.h"
#include "core.hpp"


    //typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
    //SDL_AddEventWatch(SDL_EventFilter,(void*)userData);

    typedef struct MouseEvent {
        PointInt pos;
        int keyState;
        MouseEvent()
        {
            pos.set( 0, 0 );
            keyState = 0;
        }
    }MouseEvent;

    class InputManager
    {
        static std::shared_ptr<InputManager> __handle;
        InputManager()
        {
            getInput();
        }
    public:
        SDL_Event input;
        MouseEvent mouse;
        static InputManager* getInputManager();

        void getInput();
    };
#endif //__INPUT_MANAGER_HPP__